from network import *

class GameClient(Thread):
    def __init__(self, game, address):
        Tread.__init__(self)
        self.game = game
        self.client_socket = socket()
        self.client_socket.connect((address))
                
    def run(self):
        message_processor = MessageProcessor(self.game)
        while game.status != CombatGame.END:
            while is_my_turn():
                my_information = "Information before the end's turn"
            self.client_socket.sendall(my_information)
            information = self.client_socket.recv(1024)
            message = compilate_information(information)
            message_processor.process_message(message)
